//
//  NQRecordManageCell.m
//  ZLFastDoctor
//
//  Created by 李岚清 on 16/5/25.
//  Copyright © 2016年 LS. All rights reserved.
//

#import "NQRecordManageCell.h"
#import "NQRecord.h"

@interface NQRecordManageCell ()

/**
 *  病例提交时间
 */
@property (weak, nonatomic) IBOutlet UILabel *currentTime;
/**
 *  病例展示图片
 */
@property (weak, nonatomic) IBOutlet UIImageView *sickView;
/**
 *  疾病类型label
 */
@property (weak, nonatomic) IBOutlet UILabel *sickTypeLabel;
/**
 *  疾病名label
 */
@property (weak, nonatomic) IBOutlet UILabel *sickNameLabel;


@end

@implementation NQRecordManageCell

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    static NSString *ID = @"record";
    NQRecordManageCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell = [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass([self class]) owner:nil options:nil]lastObject];
    }
    return cell;
}

- (void)setRecord:(NQRecord *)record{
    _record = record;
    //取消选中状态
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    //赋值数据
    //病例提交时间
    self.currentTime.text = record.postTime;
    //病例展示图片
    self.sickView.image = record.firstImage;
    //疾病类型label
    self.sickTypeLabel.text = [NSString stringWithFormat:@"%@基本病例",record.sickType];
    //疾病名label
    self.sickNameLabel.text = record.sickDetail;
}

@end
